class: center, middle, inverse, title-slide #
Support Vector Machines
## 🚧 🛣️ 🦿 ### Applied Machine Learning in R
Pittsburgh Summer Methodology Series ### Lecture 4-A July 22, 2021 --- class: inverse, center, middle # Overview <style type="text/css"> .onecol { font-size: 26px; } .twocol { font-size: 24px; } .remark-code { font-size: 24px; border: 1px solid grey; } a { background-color: lightblue; } .remark-inline-code { background-color: white; } </style> --- class: onecol ## Maximal margin classifier How do we separate these classes? <img src="data:image/png;base64,#maxmargin1.png" width="80%" /> --- class: onecol ## Maximal margin classifier With one feature, we need to find a point that separates the classes <img src="data:image/png;base64,#maxmargin2.png" width="80%" /> --- class: onecol ## Maximal margin classifier But there are many possible decision points, so which should we use? <img src="data:image/png;base64,#maxmargin3.png" width="80%" /> --- class: onecol ## Maximal margin classifier One option is to find the point with the **maximal margin** between the classes <img src="data:image/png;base64,#maxmargin4.png" width="80%" /> --- class: onecol ## Maximal margin classifier With two features (i.e., 2D), we need a decision **line** rather than a point <img src="data:image/png;base64,#maxmargin5.png" width="80%" /> --- class: onecol ## Maximal margin classifier With three features (i.e., 3D), we need a decision **plane** <img src="data:image/png;base64,#3d_plane.gif" width="50%" /> --- class: onecol ## Maximal margin classifier With one feature, we need a 1D plot and a decision **point** With two features, we need a 2D plot and a decision **line** With three features, we need a 3D plot and a decision **plane** With four or more features, we can't plot it but we need a decision **hyperplane** .footnote[[1] Technically, all of these are hyperplanes of different sizes, but we usually reserve the term for 4+ dimensions.] --- ## Support vector classifier --- ## Support vector machine --- ## Support vector regression --- # Kernels --- ## Overview of kernerls --- ## Polynomial kernel --- ## Radial basis function (RBF) kernel --- ## Hyperparameters for SVM --- ## Applied Example --- ## Live Coding Activity --- ## Hands-on Activity --- ## Break and timer